﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfTravelIndex1.aspx.cs" Inherits="msBsc.WebUi.wMall.Public.wfTravelIndex1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>旅游资讯</title>
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Public/sTraveIndex.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />

</head>
<body>
    <div class="wf_all">
        <input type="hidden" id="countryId" value="DF6723BE-A25C-4F77-BB49-A1662D3E6F2A" />
        <input type="hidden" id="cityId" value="AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5" />
        <input type="hidden" id="destionId" value="" />
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div class="main-container">
            <ul class="breadcrumb searchLable">
                <li>
                    <a href="/">首页</a>
                    <span class="divider"></span>
                </li>
                <li class="areaSelect">
                    <a href="#"><span id="topAreaValue" class="areaName" data-value=""></span><i class="selectList"></i></a>
                    <span class="divider "></span>
                    <ul class="m-p" id="topArea">
                    </ul>
                </li>
                <li class="areaSelect">
                    <a href="#"><span id="secendAreaValue" class="areaName" data-value=""></span><i class="selectList"></i></a>
                    <span class="divider"></span>
                    <ul class="m-p" id="secendArea">
                    </ul>
                </li>
                <li class="areaSelect" id="">
                    <a href="#"><span id="areaValue" class="areaName" data-value=""></span><i class="selectList"></i></a>
                    <span class="divider last"></span>
                    <ul class="m-p" id="area">
                    </ul>
                </li>
            </ul>
            <div class="classicList"><span class="titleType">景区</span><span class="more"><a id="moreScenic" target="_blank" href="javascript:void(0)">更多>></a></span></div>
            <ul class="classicList" id="scenicList">
            </ul>
            <xmp id="svc_list_temp_scenic" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                    <li><a target="_blank" class="classicC" href="/wp_TravelScenicInfo.htm?scenicId={{d.rows[i].SCENIC_ID}}"><img title="{{d.rows[i].SCENIC_NAME}}" src="/UpLoad/scenic/{{d.rows[i].SCENIC_DEFAULT_PIC}} 240x198img.jpg" /><div class="classicInfo" data-value="{{d.rows[i].SCENIC_ID}}">{{d.rows[i].SCENIC_NAME}}</div></a></li>
            {{#} }}
            </xmp>
            <div class="classicList"><span class="titleType">美食</span><span class="more"><a id="moreFood" target="_blank" href="javascript:void(0)">更多>></a></span></div>
            <ul class="classicList" id="foodList">
            </ul>
            <xmp id="svc_list_tem_food" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                    <li><a target="_blank" class="classicC" href="/wp_TravelFoodInfo.htm?foodId={{d.rows[i].NICEFOOD_ID}}"><img title="{{d.rows[i].NICEFOOD_NAME}}" src="/UpLoad/nicefood/{{d.rows[i].NICEFOOD_DEFAULT_PIC}} 240x198img.jpg" /><div class="classicInfo" data-value="{{d.rows[i].NICEFOOD_ID}}">{{d.rows[i].NICEFOOD_NAME}}</div></a></li>
            {{#} }}
            </xmp>
            <div class="classicList"><span class="titleType">购物</span><span class="more"><a id="moreSpecialty" target="_blank" href="javascript:void(0)">更多>></a></span></div>
            <ul class="classicList" id="specialtyList">
            </ul>
            <xmp id="svc_list_tem_specialty" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                    <li><a target="_blank" class="classicC" href="/wp_TravelSpecialtyInfo.htm?specialtyId={{d.rows[i].SPECIALTY_ID}}"><img title="{{d.rows[i].SPECIALTY_NAME}}" src="/UpLoad/specialty/{{d.rows[i].SPECIALTY_DEFAULT_PIC}} 240x198img.jpg" /><div class="classicInfo" data-value="{{d.rows[i].SPECIALTY_ID}}">{{d.rows[i].SPECIALTY_NAME}}</div></a></li>
            {{#} }}
            </xmp>
        </div>
        <!--start JS引用-->
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>
        <script type="text/javascript">
            var countryId;
            var cityId;
            var destionId;
            (function () {
                $("#countryId").val(GetQueryStr("countryId"));
                $("#cityId").val(GetQueryStr("cityId"));
                $("#destionId").val(GetQueryStr("destionId"));
                //得到参数
                countryId = $("#countryId").val();
                cityId = $("#cityId").val();
                destionId = $("#destionId").val();

                $("#moreScenic").attr("href", "/wp_TravelScenicList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1");
                $("#moreFood").attr("href", "/wp_TraveFoodList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1");
                $("#moreSpecialty").attr("href", "/wp_TraveSpecialtyList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1");

                $(".areaSelect").mouseover(function () {
                    $(this).prev("li").children(".divider").addClass("fl");
                    $(this).children("a").addClass("a");
                    $(this).children(".divider").addClass("sl");
                    $(this).children(".last").show();
                    $(this).find(".m-p").show();
                });
                $(".areaSelect").mouseout(function () {
                    $(this).prev("li").children(".divider").removeClass("fl");
                    $(this).children("a").removeClass("a");
                    $(this).children(".divider").removeClass("sl");
                    $(this).children(".last").hide();
                    $(this).find(".m-p").hide();
                });

                $(".m-p li").live("click", function () {
                    var parent = $(this).parent(".m-p");
                    if (parent.attr("id") == "topArea") {
                        if (countryId == $(this).attr("data-value")) {
                            return;
                        }
                        countryId = $(this).attr("data-value");
                        btnDo("getCity");
                        return;
                        //window.location.href = "/wMall/Public/wfTravelIndex.aspx?countryId="+
                    }
                    if (parent.attr("id") == "secendArea") {
                        if (cityId == $(this).attr("data-value")) {
                            return;
                        }
                        cityId = $(this).attr("data-value");
                        window.location.href = "/wp_TravelIndex.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=";
                        return;
                    }
                    if (parent.attr("id") == "area") {
                        if (destionId == $(this).attr("data-value")) {
                            return;
                        }
                        destionId = $(this).attr("data-value");
                        window.location.href = "/wp_TravelIndex.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId;
                        return;
                    }
                });
            })()

            function btnDo(sEbtn) {
                GtGrid1Action = sEbtn;
                var opart = new jsonRow();
                if (sEbtn == "getClassic") {
                    opart = GetGtParam();
                } else if (sEbtn == "getCity") {
                    opart.AddCell("countryId", countryId);
                    opart.AddCell("ACTION", GtGrid1Action);
                } else if (sEbtn == "getScenic") {
                    opart = GetGtParam();
                }
                ajaxComm(opart);
            };
            //执行AJAX调用时获取参数
            function GetGtParam() {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
                _jsParam.AddCell("isAll", "true");
                _jsParam.AddCell("destionId", $("#destionId").val());
                _jsParam.AddCell("cityId", $("#cityId").val());
                _jsParam.AddCell("countryId", $("#countryId").val());
                _jsParam.AddCell("ACTION", GtGrid1Action);
                return _jsParam;
            };

            function selectArea(inputId, data, checkId) {
                var htm = "";
                var isCheck = false;
                for (var i = 0; i < data.length; i++) {
                    if (checkId == data[i].ID) {
                        isCheck = true;
                        $("#" + inputId).siblings("a").find(".areaName").text(data[i].Name);
                        $("#" + inputId).siblings("a").find(".areaName").attr("data-value", data[i].ID);
                    }
                    htm += "<li data-value='" + data[i].ID + "'>" + data[i].Name + "</li>";
                }
                if (!isCheck) {
                    $("#" + inputId).siblings("a").find(".areaName").text(data[0].Name);
                    $("#" + inputId).siblings("a").find(".areaName").attr("data-value", data[0].ID);
                }
                $("#" + inputId).html(htm);
            }
            btnDo("getClassic");
            //btnDo("getScenic");
        </script>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>

</body>
</html>
